{% extends "base.jinja" %}

{% block title %}商品_{% endblock %}
{% block keywords %}结婚用品,婚纱品牌,婚鞋,新娘礼服,新郎西服{% endblock %}
{% block description %}您的在线婚庆用品清单{% endblock %}

{% block css %},main.css{% endblock %}
{% block focussign %}focussign{% endblock %}
{% block pagetype %}goods{% endblock %}

{% block main %}
    <div class="page-banner goods-banner" id="goods-banner">
        <div class="layout">
            <span class="pb-title">BRIDAL SHOP</span>
            <h2>{% if current_tag == 'all' %}新娘商店{% else %}{{current_tag}}{% endif %}</h2>
            <div class="pb-action">{{total}}件 商品</div>
            <span class="page-help"><a href="{{domain}}site/help/#supplier-i7" target="_blank">如何发布商品？</a></span>
        </div>
    </div>

    <div class="layout mt-crumb">
        <a href="{{domain}}">首页</a>{% if current_cate %}&nbsp;>&nbsp;<a href="/share/cate/{{current_cate.id}}/">{{current_cate.name}}</a>{% endif %}&nbsp;>&nbsp;<b>商品</b>
    </div>

    <div class="share s-notitle page" id="share">
        <ul>
            <li class="s-tags">
                <div class="st-item">
                    {% if current_tag == 'all' %}
                    <em>全部</em>
                    {% else %}
                        <a href="{{domain}}share/goods/all/">全部</a>
                    {% endif %}

                    {% for tag in goods_tag %}
                        {% if current_tag == tag %}
                            <em>{{tag}}</em>
                        {% else %}
                            {% if tag %}
                            <a href="{{domain}}share/goods/{{tag|encode}}/">{{tag}}</a>
                            {% endif %}
                        {% endif %}
                    {% endfor %}
                </div>
            </li>
            {% for share in share_data.goods %}
                <li data-mid="{{share.cover_id}}" data-sid="{{share.share_id}}">
                    <a target="_blank" class="s-link" target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" {% if share.background %}style="background:{{share.background}};opacity:0.5;"{% endif %}>
                    {% if loop.index < 12 %}
                        <img alt="{{share.title}}" src="{{share.cover}}!260" width="260"/>
                    {% else %}
                        <img alt="{{share.title}}" src="http://s.lovewith.me/static/images/blank.gif" data-src="{{share.cover}}!260" width="260"/>
                    {% endif %}
                    </a>
                    <div class="s-ext">
                        <p title="{{share.title|forceescape}}">
                            <a target="_blank" target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}">
                                {{share.title|safe|cut_str(32)}}
                            </a>
                        </p>
                    </div>
                </li>
            {% endfor %}
        </ul>
        {% if total_page %}
            {% if current_cate %}
                <div class="s-more">
                    <a href="javascript:;" data-scroll="1" data-page="{{current_page}}" id="s-more-btn" data-action="/share/ajax/g/goods/?cate={{current_cate.id}}">更多..</a>
                </div>
                <div class="pagination">{% autoescape off %}{{current_page|pagination(total_page, '/share/goods/cate/%s/' % current_cate.id)}}{% endautoescape %}</div>
            {% else %}
                <div class="s-more">
                    <a href="javascript:;" data-scroll="1" data-page="{{current_page}}" id="s-more-btn" data-action="/share/ajax/g/goods/?tag={{current_tag}}">更多..</a>
                </div>
                <div class="pagination">{% autoescape off %}{{current_page|pagination(total_page, '/share/goods/%s/' % current_tag)}}{% endautoescape %}</div>
            {% endif %}
        {% endif %}
    </div>
{% endblock %}


{% block script %}
<script>seajs.use('page/goods', function(p){p.render()});</script>
{% endblock %}